const path = require('path');
const nodeExternals = require('webpack-node-externals');

module.exports = {
  mode:'none',
  entry:path.resolve(__dirname, './src/index.js'),
  output: {
    path: path.join(__dirname, './dist/'),
    filename: "index.js",
    publicPath: '/',
    libraryTarget:'commonjs2'
  },
  module:{
    rules:[
      {
        test:/\.js/,
        use:{
          loader: 'babel-loader',
          options: {
              presets: ['@babel/preset-env']
          }
      },
      }, 
    ]
  },
  externals: [nodeExternals()]

  
}